var limsResult = Gikam.getPageObject({

    getTreeColumns: function () {
        return [{
            field: 'sampleCode',
            title: 'T_LIMS_SAMPLE.SAMPLECODE',
            width: 120,
            readonly: true
        }]
    },

    getBackOrderTaskColumns: function () {
        return [{
            field: 'sampleCode',
            title: 'T_LIMS_SAMPLE.SAMPLECODE',
            width: 140
        }, {
            field: 'ext$.runcode',
            type: 'link',
            title: 'T_LIMS_RUN.RUNCODE',
            width: 140
        }, {
            field: 'ext$.testcode',
            width: 140,
            title: 'T_LIMS_TEST.TESTCODE'
        }, {
            field: 'ext$.testname',
            width: 140,
            title: 'T_LIMS_TEST.TESTNAME'
        }, {
            field: 'ext$.methodcode',
            width: 140,
            title: 'T_LIMS_METHOD.METHODCODE'
        }, {
            field: 'ext$.methoddesc',
            width: 140,
            title: 'T_LIMS_METHOD.METHODDESC'
        }, {
            field: 'ext$.productname',
            width: 140,
            title: 'T_LIMS_PRODUCT_MAIN.PRODUCTNAME'
        }, {
            field: 'ext$.tester',
            width: 140,
            title: 'T_LIMS_ORDER_TASK.TESTER'
        }, {
            field: 'ext$.reviewer',
            width: 140,
            title: 'T_LIMS_ORDER_TASK.REVIEWER'
        }]
    },

    getBackTrackAnalyteColumns: function () {
        return [{
            field: 'sorter',
            title: 'T_LIMS_RESULT.SORTER',
            width: 140,
        }, {
            field: 'analyte',
            title: 'T_LIMS_RESULT.ANALYTE',
            width: 140
        }, {
            field: 'analType',
            title: 'T_LIMS_RESULT.ANALTYPE',
            type: 'select',
            search: true,
            category: 'sys',
            param: {
                codeCategoryId: 'analyteResultCategory'
            },
            width: 140
        }, {
            field: 'originalResult',
            title: 'T_LIMS_RESULT.ORIGINALRESULT',
            type: 'choose',
            category: 'possibleResult',
            width: 140
        }, {
            field: 'finalResult',
            title: 'T_LIMS_RESULT.FINALRESULT',
            width: 140,
            formatter: function (i, v, row) {
                if (row.analType === 'F') {
                    return Gikam.printf('<a href="javascript:;"' +
                        ' onclick="limsResult.loadRichText(\'{id}\', \'{field}\')">{name}</a>', {
                        id: row.orderTaskId,
                        field: row.analyteId,
                        name: v
                    });
                } else {
                    return v;
                }
            }
        }, {
            field: 'judge',
            title: 'T_LIMS_RESULT.JUDGE',
            width: 140,
            type: 'select',
            search: true,
            category: 'judgeType',
            styleFormatter: function (row) {
                return {
                    backgroundColor: row.ext$.color
                }
            }
        }, {
            field: 'picture',
            title: 'T_LIMS_RESULT.PICTURE',
            width: 140
        }, {
            field: 'unit',
            title: 'T_LIMS_RESULT.UNIT',
            width: 140,
            // type: 'select',
            // category: 'unitsCategory',
        }]
    },

    getBackTrackRecordColumns: function () {
        return [{
            field: 'ext$.analyte',
            title: 'T_LIMS_RESULT.ANALYTE',
            width: 140,
            readonly: true
        }, {
            field: 'createdByName',
            title: 'T_LIMS_RESULT.CREATEDBYNAME',
            width: 140,
            type: 'date',
            readonly: true
        }, {
            field: 'newValue',
            title: 'T_CORE_AT_RECORD_LINE.NEWVALUE',
            width: 140,
            readonly: true
        }, {
            field: 'oldValue',
            title: 'T_CORE_AT_RECORD_LINE.OLDVALUE',
            width: 140,
            readonly: true
        }, {
            field: 'createdTime',
            title: 'T_LIMS_RESULT.CREATEDTIME',
            readonly: true
        }]
    },

    getRunGridColumns : function() {
        return [ {
            checkbox : true
        }, {index: true},{
            field : 'runCode',
            title : 'T_LIMS_RUN.RUNCODE',
            type: 'link'
        }, {
            field : 'testCode',
            title : 'T_LIMS_TEST.TESTCODE'
        }, {
            field : 'testName',
            title : 'T_LIMS_TEST.TESTNAME'
        }, {
            field : 'methodCode',
            title : 'T_LIMS_METHOD.METHODCODE'
        }, {
            field : 'methodDesc',
            title : 'T_LIMS_METHOD.METHODDESC',
            type: 'link'
        }, {
            field : 'createdTime',
            title : 'T_LIMS_RUN.CREATEDTIME'
        }, {
            field : 'roomNo',
            title : 'T_LIMS_RUN.ROOMNO',
            editor : true
        }, {
            field : 'temperature',
            title : 'T_LIMS_RUN.TEMPERATURE',
            editor : true
        }, {
            field : 'dampness',
            title : 'T_LIMS_RUN.DAMPNESS',
            editor : true
        }/*, {
            field : 'pressureTo',
            title : 'T_LIMS_RUN.PRESSURETO',
            editor : true
        }, {
            field : 'pressureFrom',
            title : 'T_LIMS_RUN.PRESSUREFROM',
            editor : true
        }*/, {
            field : 'reviewRejectReason',
            title : 'T_LIMS_RUN.REVIEWREJECTREASON'
        } ];
    },

    getBaseInfoFormFields : function() {
        return [ {
            field : 'analyte',
            title : 'T_LIMS_RESULT.ANALYTE',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'unit',
            title : 'T_LIMS_RESULT.UNIT',
            validators : [ 'strLength[0,6]' ]
        }, {
            field : 'calcFlag',
            title : 'T_LIMS_RESULT.CALCFLAG',
            validators : [ 'strLength[0,1]' ]
        }, {
            field : 'formula',
            title : 'T_LIMS_RESULT.FORMULA',
            validators : [ 'strLength[0,200]' ]
        }, {
            field : 'analType',
            title : 'T_LIMS_RESULT.ANALTYPE',
            validators : [ 'strLength[0,4]' ]
        }, {
            field : 'originalResult',
            title : 'T_LIMS_RESULT.ORIGINALRESULT',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'finalResult',
            title : 'T_LIMS_RESULT.FINALRESULT',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'judge',
            title : 'T_LIMS_RESULT.JUDGE',
            validators : [ 'strLength[0,11]' ]
        }, {
            field : 'taskFlag',
            title : 'T_LIMS_RESULT.TASKFLAG',
            validators : [ 'strLength[0,1]' ]
        }, {
            field : 'taskManageFlag',
            title : 'T_LIMS_RESULT.TASKMANAGEFLAG',
            validators : [ 'strLength[0,1]' ]
        }, {
            field : 'writeFlag',
            title : 'T_LIMS_RESULT.WRITEFLAG',
            validators : [ 'strLength[0,1]' ]
        }, {
            field : 'editFlag',
            title : 'T_LIMS_RESULT.EDITFLAG',
            validators : [ 'strLength[0,1]' ]
        }, {
            field : 'hideFlag',
            title : 'T_LIMS_RESULT.HIDEFLAG',
            validators : [ 'strLength[0,1]' ]
        }, {
            field : 'status',
            title : 'T_LIMS_RESULT.STATUS',
            validators : [ 'strLength[0,4]' ]
        }, ];
    },

    getChooseListColumns : function() {
        return [ {index: true},{
            field : 'analyte',
            title : 'T_LIMS_RESULT.ANALYTE'
        }, {
            field : 'unit',
            title : 'T_LIMS_RESULT.UNIT'
        }, {
            field : 'calcFlag',
            title : 'T_LIMS_RESULT.CALCFLAG'
        }, {
            field : 'formula',
            title : 'T_LIMS_RESULT.FORMULA'
        }, {
            field : 'analType',
            title : 'T_LIMS_RESULT.ANALTYPE'
        }, {
            field : 'originalResult',
            title : 'T_LIMS_RESULT.ORIGINALRESULT'
        }, {
            field : 'finalResult',
            title : 'T_LIMS_RESULT.FINALRESULT'
        }, {
            field : 'judge',
            title : 'T_LIMS_RESULT.JUDGE'
        }, {
            field : 'taskFlag',
            title : 'T_LIMS_RESULT.TASKFLAG'
        }, {
            field : 'taskManageFlag',
            title : 'T_LIMS_RESULT.TASKMANAGEFLAG'
        }, {
            field : 'writeFlag',
            title : 'T_LIMS_RESULT.WRITEFLAG'
        }, {
            field : 'editFlag',
            title : 'T_LIMS_RESULT.EDITFLAG'
        }, {
            field : 'hideFlag',
            title : 'T_LIMS_RESULT.HIDEFLAG'
        }, {
            field : 'status',
            title : 'T_LIMS_RESULT.STATUS'
        }, ];
    },

    getRunOrderTaskGridColumns : function() {
        return [ {
            checkbox : true
        }, {index: true},{
            field : 'ext$.productname',
            title : 'T_LIMS_PRODUCT_MAIN.PRODUCTNAME',
        }, {
            field : 'batchCode',
            title : 'T_LIMS_ORDER_TASK.BATCHCODE',
            width : 130
        },{
            field : 'ext$.operationbatch',
            title : 'T_LIMS_OPERATION_BATCH.OPERATIONBATCH'
        }, {
            field : 'sampleCode',
            title : 'T_LIMS_ORDER_TASK.SAMPLECODE',
            width : 170
        },{
            field : 'ext$.sampletype',
            title : 'T_LIMS_PRODUCT.SAMPLETYPENAME',
            width : 130,
        },{
            field : 'ext$.etcode',
            title : 'T_LIMS_EXPERIMENTAL_TEMPLATE.ETNAME',
            type : 'select',
            category : 'experimentalTemplate',
        }]
    },

    getAllDerivativeEditListColumns : function() {
        return [ {
            checkbox : true
        }, {index: true},{
            field : 'sampleCode',
            title : 'T_LIMS_SAMPLE.SAMPLECODE',
        }, {
            field : 'parentNo',
            title : 'T_LIMS_SAMPLE.PARENTNO',
        }, {
            field : 'oriNo',
            title : 'T_LIMS_SAMPLE.ORINO',
        }, {
            field : 'sampleType',
            title : "T_LIMS_SAMPLE.SAMPLETYPE",
        }, {
            field : 'ext$.derivativetype',
            title : 'T_LIMS_SAMPLE_DERIVATIVE.DERIVATIVETYPE',
            type : "select",
            category : 'sys',
            firstBlank : false,
            param : {
                codeCategoryId : 'derivativeMakeType'
            },
        }, {
            field : 'ext$.productname',
            title : "T_LIMS_FOLDER.PRODUCTNAME",
        }, {
            field : 'ext$.useflag',
            title : 'GIKAM.ACTIVE.TITLE.STATUS',
            type : "simpleCheckbox",
        } ]
    },

    getMaterialListColumns : function() {
        return [ {
            checkbox : true
        }, {
            index : true
        }, {
            field : 'matCode',
            title : 'T_LIMS_RUN_MATERIAL.MATCODE',
            width : 160,
        }, {
            field : 'ext$.matname',
            title : 'T_LIMS_MATERIAL.MATNAME',
            width : 200,
        }, {
            field : 'labBatchNo',
            title : 'T_LIMS_RUN_MATERIAL.LABBATCHNO',
            editor: true,
            width : 160,
        }, {
            field: 'configDate',
            title: '配置日期',
            width : 160,
            type: 'date'
        }, {
            field: 'expirationDate',
            title: '有效期',
            width : 160,
            type: 'date'
        }, {
            field : 'recommendedAmount',
            title : 'T_LIMS_RUN_MATERIAL.RECOMMENDEDAMOUNT',// 建议使用量
            width : 160,
        }, {
            field : 'actualAmount',
            title : 'T_LIMS_RUN_MATERIAL.ACTUALAMOUNT',// 实际使用量
            editor: true,
            width : 160,
        }, {
            field : 'ext$.defaultunitcode',
            title : 'T_LIMS_MATERIAL.DEFAULTUNITCODE',
            width : 160,
            // type : 'select',
            // search : true,
            // category : 'unitsCategory',
        }, {
            field : 'ext$.specifications',
            title : 'T_LIMS_MATERIAL.SPECIFICATIONS',
            width : 160,
        } ];
    },

    getEquiptListColumns : function(editor) {
        return [ {
            checkbox : true
        }, {index: true},{
            field : 'equipNo',
            title : 'T_LIMS_EQUIPMENT.EQUIPCODE',
            width:200
        }, {
            field : 'equipName',
            title : 'T_LIMS_EQUIPMENT.EQUIPNAME'
        }, {
            field : 'ext$.eqclass',
            title : 'T_LIMS_EQUIPMENT.EQUIPCLASS',
            type: 'select',
            category: 'sys',
            firstBlank: false,
            param: {
                codeCategoryId: 'eqClass'
            },
            width:140
            // type : 'select',
            // category : 'equipmentCategory',
            // firstBlank : false,
        }, {
            field : 'useFlag',
            title : 'T_LIMS_RUN_EQUIP.USEFLAG',
            type : 'simpleCheckbox',
            editor: editor,
            width:140
            // type : 'select',
            // category : 'equipmentCategory',
            // firstBlank : false,
        }, {
            field: 'remark',
            title: '备注',
            width: 140
        },];
    },

    getBatchInfoFormFields: function () {
        return [{
            field : 'roomNo',
            title : 'T_LIMS_RUN.ROOMNO',
            validators: ['notEmpty']
        }, {
            field : 'temperature',
            title : 'T_LIMS_RUN.TEMPERATURE',
            validators: ['notEmpty']
        }, {
            field : 'dampness',
            title : 'T_LIMS_RUN.DAMPNESS',
            validators: ['notEmpty']
        }/*, {
            field : 'pressureTo',
            title : 'T_LIMS_RUN.PRESSURETO',
            validators: ['notEmpty']
        }, {
            field : 'pressureFrom',
            title : 'T_LIMS_RUN.PRESSUREFROM',
            validators: ['notEmpty']
        }*/];
    },

    getDerivativeFormFields : function() {
        return [{
            field : 'sampleType',
            title : 'T_LIMS_SAMPLE.SAMPLETYPE',
            type : 'select',
            search: true,
            category: 'sampleType',
            firstBlank : false,
            param : {
                filter_derivativeType : 1,
            },
            validators : [ 'notEmpty' ],
/*            onAfterChoose: function (rows, index) {
                if (rows) {
                    this.setData({
                        sampleType: rows[0].sampleTypeName,
                        sampleTypeCode: rows[0].sampleTypeCode
                    })
                }
            },*/
            refreshGrid: false,
        },{
            title : 'T_LIMS_SAMPLE_DERIVATIVE.DERIVATIVETYPE',
            field : 'derivativeType',
            type : "select",
            category : 'sys',
            validators : [ 'notEmpty' ],
            firstBlank : false,
            param : {
                codeCategoryId : 'derivativeMakeType'
            },
            refreshGrid: false,
        }]
    },

    getAbnormalOrderTaskGridColumns : function() {
        return [ {
            checkbox : true
        }, {index: true},{
            field : 'ext$.productname',
            title : 'T_LIMS_PRODUCT_MAIN.PRODUCTNAME',
        }, {
            field : 'batchCode',
            title : 'T_LIMS_ORDER_TASK.BATCHCODE',
            width : 130
        }, {
            field : 'runCode',
            title : 'T_LIMS_ORDER_TASK.RUNCODE',
            width : 130
        },{
            field : 'sampleCode',
            title : 'T_LIMS_ORDER_TASK.SAMPLECODE',
            type : 'link',
            width : 170
        },{
            field : 'ext$.sampletype',
            title : 'T_LIMS_PRODUCT.SAMPLETYPENAME',
            width : 130,
        },{
            field : 'testName',
            title : 'T_LIMS_TEST.TESTNAME',
            width : 130,
        },{
            field : 'methodDesc',
            title : 'T_LIMS_METHOD.METHODDESC',
            width : 130,
        },{
            field : 'ext$.etcode',
            title : 'T_LIMS_EXPERIMENTAL_TEMPLATE.ETNAME',
            type : 'select',
            category : 'experimentalTemplate',
        },{
            field : 'reason',
            title : 'T_LIMS_ORDER_TASK.REASON',
            width : 140,
        }]
    },

    getResultListColumns : function() {
        return [ {
            checkbox : true
        }, {index: true},{
            field : 'sorter',
            title : 'T_LIMS_RESULT.SORTER'
        }, {
            field : 'analyte',
            title : 'T_LIMS_RESULT.ANALYTE'
        }, {
            field : 'originalResult',
            title : 'T_LIMS_RESULT.ORIGINALRESULT',
            titleAlign : 'center',
            textAlign: 'center',
            formatter: function (i, v, row) {
                if (row.analType === 'F') {
                    return Gikam.printf('<a href="javascript:;" onclick="limsResult.resultCkeditor(\'{analyteId}\' , \'{orderTaskId}\', \'{readonly}\')">查看</a>', {
                        analyteId : row.analyteId,
                        orderTaskId: row.orderTaskId,
                        readonly: true
                    });
                } else {
                    return v;
                }
            },
        }, {
            field : 'finalResult',
            title : 'T_LIMS_RESULT.FINALRESULT'
        }, {
            field : 'unit',
            title : 'T_LIMS_RESULT.UNIT'
        }, {
            field : 'judge',
            title : 'T_LIMS_RESULT.JUDGE',
            type: 'select',
            search: true,
            category: 'judgeType',
            styleFormatter : function(row) {
                return {
                    backgroundColor : row.ext$.color
                }
            }
        }, {
            field : 'picture',
            title : 'T_LIMS_RESULT.PICTURE'
        }, {
            field : 'analType',
            title : 'T_LIMS_RESULT.ANALTYPE',
            type: 'select',
            category: 'sys',
            width: 160,
            firstBlank: false,
            param: {
                codeCategoryId: 'analyteResultCategory'
            },
        }, ];
    },

    // 操作记录
    getFlowListColumns: function () {
        return [{
            checkbox: true
        }, {
            index: true
        }, {
            field: 'auditStep',
            title: 'T_LIMS_AUDIT_RECORD.AUDITSTEP',
        }, {
            field: 'auditOperation',
            title: 'T_LIMS_AUDIT_RECORD.AUDITOPERATION',
            width: 140
        }, {
            field: 'auditByName',
            title: 'T_LIMS_AUDIT_RECORD.AUDITBYNAME',
        }, {
            field: 'createdTime',
            title: 'T_LIMS_AUDIT_RECORD.CREATEDTIME',
            type: 'dateTime',
            width: 140
        }, {
            field: 'remarks',
            title: 'T_LIMS_AUDIT_RECORD.REMARKS',
        }];
    },

    resultCkeditor: function (analyteId, orderTaskId, readonly) {
        Gikam.create('modal', {
            title: '分析项结果录入',
            height: '90%',
            width: '70%',
            url: limsResult.baseUrl + '/page/ckeditor-result' + Gikam.param({
                analyteId: analyteId,
                orderTaskId: orderTaskId,
                readonly: readonly
            })
        });
    },

    baseUrl : IFM_CONTEXT + '/secure/basemodule/business/results',
    orderTaskUrl : IFM_CONTEXT + '/secure/basemodule/business/order-tasks',
    runUrl : IFM_CONTEXT + '/secure/basemodule/business/runs',
    runEquipUrl : IFM_CONTEXT + '/secure/basemodule/business/run-equips',
    runMaterialUrl : IFM_CONTEXT + '/secure/basemodule/business/run-materials',
    derivativelUrl : IFM_CONTEXT + '/secure/baseline/samplemanage/sample-derivatives',
    auditRecordUrl: IFM_CONTEXT + '/secure/baseline/auditrecord',
    boardHoleUrl : IFM_CONTEXT + '/secure/basemodule/business/run-board-holes',
    sampleUrl: IFM_CONTEXT + '/secure/baseline/samplemanage/samples',

    /**
     * 以下为搬运寻因的富文本相关方法
     */
    // 加载并编辑富文本的内容，并同步更新至t_lims_result表的结果字段中
    loadAndEditRichText: function (id, field, gridId) {
        // id为orderTaskId，fied为ext$.analyteId
        if (Gikam.isEmpty(id) || Gikam.isEmpty(field)) {
            return false;
        }
        // 同步查询出指定工序下指定的分析项的t_lims_result表的Id
        let orderTaskAnalyteResultId = '';
        let analyte = '';
        Gikam.postSync(limsResult.baseUrl + '/queries', Gikam.getJsonWrapper({
            f: {
                // 工序任务ID
                orderTaskId_EQ: id,
                // 截取分析项的ID
                analyteId_EQ: field.slice(5)
            },
        })).done(function (data) {
            if (Gikam.isNotEmpty(data)) {
                Gikam.each(data.rows, function (index, item) {
                    // 理论仅有一条数据
                    orderTaskAnalyteResultId = item.id;
                    analyte = item.analyte;
                });
            } else {
                // 当前工序下不存在指定分析项ID的分析项结果数据
                return false;
            }
        });
        // 弹出富文本结果详情
        Gikam.create('modal', {
            title: '分析项结果录入',
            height: '90%',
            width: '70%',
            url: limsResult.baseUrl + '/page/result-richtext-detail' + Gikam.param({
                id: orderTaskAnalyteResultId,
                analyte : analyte
            }),
            onAfterClose : function() {
                Gikam.getComp(gridId).refresh()
            }
        });
    },

    // 加载富文本内容不可编辑
    loadRichText: function (id, field) {
        // id为orderTaskId，fied为analyteId
        if (Gikam.isEmpty(id) || Gikam.isEmpty(field)) {
            return false;
        }
        // 同步查询出指定工序下指定的分析项的t_lims_result表的Id
        let orderTaskAnalyteResultId = '';
        Gikam.postSync(limsResult.baseUrl + '/queries', Gikam.getJsonWrapper({
            f: {
                // 工序任务ID
                orderTaskId_EQ: id,
                // 分析项ID
                analyteId_EQ: field
            },
        })).done(function (data) {
            if (Gikam.isNotEmpty(data)) {
                console.log(data.rows);
                Gikam.each(data.rows, function (index, item) {
                    // 理论仅有一条数据
                    orderTaskAnalyteResultId = item.id;
                });
            } else {
                // 当前工序下不存在指定分析项ID的分析项结果数据
                return false;
            }
        });
        // 弹出富文本结果详情
        Gikam.create('modal', {
            title: '分析项结果录入',
            height: '90%',
            width: '70%',
            url: limsResult.baseUrl + '/page/result-richtext-readonly-detail' + Gikam.param({
                id: orderTaskAnalyteResultId
            })
        });
    },

    // 加载富文本内容不可编辑
    loadRichTextReadonly: function (id, field) {
        // id为orderTaskId，fied为ext$.analyteId
        if (Gikam.isEmpty(id) || Gikam.isEmpty(field)) {
            return false;
        }
        // 同步查询出指定工序下指定的分析项的t_lims_result表的Id
        let orderTaskAnalyteResultId = '';
        Gikam.postSync(limsResult.baseUrl + '/queries', Gikam.getJsonWrapper({
            f: {
                // 工序任务ID
                orderTaskId_EQ: id,
                // 分析项ID
                analyteId_EQ: field.slice(5)
            },
        })).done(function (data) {
            if (Gikam.isNotEmpty(data)) {
                console.log(data.rows);
                Gikam.each(data.rows, function (index, item) {
                    // 理论仅有一条数据
                    orderTaskAnalyteResultId = item.id;
                });
            } else {
                // 当前工序下不存在指定分析项ID的分析项结果数据
                return false;
            }
        });
        // 弹出富文本结果详情
        Gikam.create('modal', {
            title: '分析项结果录入',
            height: '90%',
            width: '70%',
            url: limsResult.baseUrl + '/page/result-richtext-readonly-detail' + Gikam.param({
                id: orderTaskAnalyteResultId
            })
        });
    },

    // 富文本详情表单界面
    richTextField: function () {
        return [ {
            field: 'finalResult',
            title : 'T_LIMS_RESULT.FINALRESULT',
            type: 'ckeditor',
            colspan: 3,
            height: 700,
            eidtor : true
        } ]
    },

    // 富文本详情表单界面
    richTextReadOnlyField: function () {
        return [ {
            field: 'finalResult',
            title : 'T_LIMS_RESULT.FINALRESULT',
            type: 'ckeditor',
            colspan: 3,
            height: 700,
            readonly : true
        } ]
    },

    // 加载富文本内容不可编辑
    loadAnalyteRichText: function (id, field) {
        // id为orderTaskId，fied为ext$.analyteId
        if (Gikam.isEmpty(id) || Gikam.isEmpty(field)) {
            return false;
        }
        // 同步查询出指定工序下指定的分析项的t_lims_result表的Id
        let orderTaskAnalyteResultId = '';
        Gikam.postSync(limsResult.baseUrl + '/queries', Gikam.getJsonWrapper({
            f: {
                // 工序任务ID
                orderTaskId_EQ: id,
                // 分析项的ID
                analyteId_EQ: field
            },
        })).done(function (data) {
            if (Gikam.isNotEmpty(data)) {
                console.log(data.rows);
                Gikam.each(data.rows, function (index, item) {
                    // 理论仅有一条数据
                    orderTaskAnalyteResultId = item.id;
                });
            } else {
                // 当前工序下不存在指定分析项ID的分析项结果数据
                return false;
            }
        });
        // 弹出富文本结果详情
        Gikam.create('modal', {
            title: '分析项结果录入',
            height: '90%',
            width: '70%',
            url: limsResult.baseUrl + '/page/result-richtext-readonly-detail' + Gikam.param({
                id: orderTaskAnalyteResultId
            })
        });
    },
});
